from django.conf.urls import url
from . import views
from classviewapp.views import my_decorator
urlpatterns = [
    url(r'^student/$', views.student),
    url(r'^teacher/$', views.teacher),

    # 增加类视图路由
    url(r'^student_class_view/$', views.StudentView.as_view()),
    # 在url中给类视图增加装饰器, 不灵活, 所有的请求方式都增加了装饰器的功能
    # url(r'^student_class_view/$', my_decorator(views.StudentView.as_view())),
    # url(r'^student_class_view/$', view),
    # views.StudentView.as_view()  执行的结果就是一个 函数 ->  view(request)  函数
]
